﻿@model List<Fonour.Application.Dtos.MenuDto>
@foreach (var menu in Model)
{
    var controller = ViewContext.RouteData.Values["Controller"];
    var isActive = ("/" + controller) == menu.Url; //判断当前功能是否处于激活
    <li class="nav-item">
        <a href="@menu.Url" class="@(isActive ? "nav-link active" : "nav-link" )">
            <i class="@("nav-icon " + @menu.Icon)"></i>
            <p>@menu.Name</p>
        </a>
    </li>
}